<?
if(!defined ('U_MOD'))
{
	echo"<meta http-equiv='refresh' content='0;url=/index.php'>";
	exit;
}

include 'topmenu.php';

$queryTitles=mysql_query("SELECT
		titles.*,
		mods.modules_u_name
	FROM
		".$PortalPref.$amk." titles
	JOIN
		".$PortalPref."modules mods
	ON
		titles.titles_mkey=mods.modules_key
	AND
		mods.modules_u_active='1'
	ORDER BY
		titles.titles_mkey ASC");

print '<table>';
$dd=1;
while ($resultTitles=mysql_fetch_assoc($queryTitles))
{
	if ($resultTitles['titles_key_generate']==1)
		$KeyWords=_GENERATOR_;
	else
	{
		if ($resultTitles['titles_keywords']=='')
			$KeyWords=_DEFAULT_FOR_PORTAL_;
		else
			$KeyWords=pEcho($resultTitles['titles_keywords']);
	}

	if ($resultTitles['titles_mask']=='')
		$TilesMask=_DEFAULT_FOR_PORTAL_;
	else
		$TilesMask=$resultTitles['titles_mask'];

	$modifyIcon='<a href="'.$portal_url.'/admin.php?amk='.$amk.'&apk=manage&act=3&tid='.$resultTitles['titles_id'].''.$addToLink.'"><img src="'.$portal_url.'/images/icon/16x16_png/modify.png" id="img-action" title="'._MODIFY_TITLE_.'" ></a>';
    $delIcon='<a href="'.$portal_url.'/admin.php?amk='.$amk.'&apk=change&act=1&tid='.$resultTitles['titles_id'].''.$addToLink.'" onClick="return confirm(\''._CLICKDEL_.' '._THISTITLE_.': '.pEcho($resultTitles['modules_u_name']).'\');"><img src="'.$portal_url.'/images/icon/16x16_png/delete.png" id="img-action" title="'._DEL_TITLE_.'" ></a>';

	$dd++;$iclass = ($dd % 2) ? "even" : "odd";
	print '<tr id="'.$iclass.'">
		<td rowspan="2">'.pEcho($resultTitles['modules_u_name']).'</td>
		<td>'.$TilesMask.'</td>
		<td id="column-action" rowspan="2">'.$modifyIcon.''.$delIcon.'</td>
	</tr>
	<tr id="'.$iclass.'">
		<td>'.$KeyWords.'</td>
	</tr>';
}
print'</table>';
?>
